# Maintainer: Przemyslaw Pawelczyk <przemoc@zoho.com>
pkgname=rhash
pkgver=1.4.5
pkgrel=0
pkgdesc="Utility for calculation and verification of hash sums and magnet links"
url="http://rhash.anz.ru"
arch="all"
license="0BSD"
makedepends="openssl-dev>3"
subpackages="$pkgname-doc $pkgname-dev $pkgname-libs"
source="https://downloads.sourceforge.net/rhash/rhash-$pkgver-src.tar.gz"
builddir="$srcdir/RHash-$pkgver"

build() {
	# not autotools
	./configure \
		--prefix=/usr \
		--sysconfdir=/etc \
		--enable-openssl \
		--disable-openssl-runtime
	make
}

check() {
	make test-shared
}

package() {
	make -j1 DESTDIR="$pkgdir" install install-lib-headers install-lib-shared install-lib-so-link
}

sha512sums="
49bd6aa2497efc4871ae31eaca51d2dc78ceb7126311557d5280b14fafe9355eaecad37f0f78f865e4e1dd1aeb506d3301989cd2f9fff7b0091c81978e8c2f2e  rhash-1.4.5-src.tar.gz
"
